﻿// ***************************************************************************
// YAMM
// Copyright (C) 2008 Christian Schmiljun, Frank Weißenborn
// http://www.codeplex.com/YAMM 
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
// ***************************************************************************

using System;
using System.Windows.Forms;

namespace YAMM.PlugIn
{
    /// <summary>
    /// Defines methods for <see cref="IWindow"/> collections.
    /// </summary>
    public interface IWindowCollection
    {
        /// <summary>
        /// Adds the specified identifier.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <returns>The new window.</returns>
        IWindow Add(Guid identifier, string caption);
        /// <summary>
        /// Adds the specified identifier.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="caption">The caption.</param>
        /// <param name="content">The content in window.</param>
        /// <returns>The new window.</returns>
        IWindow Add(Guid identifier, string caption, Control content);

        /// <summary>
        /// Determines whether YAMM.PlugIn.IWindowCollection contains a specific <see cref="IWindow"/>.        
        /// </summary>
        /// <param name="identifier">The identifier of specific window.</param>
        /// <returns>
        /// 	<c>true</c> if YAMM.PlugIn.IWindowCollection contains the specified window with this identifier; otherwise, <c>false</c>.
        /// </returns>
        bool Contains(Guid identifier);
        /// <summary>
        /// Removes the specified window with this identifier.
        /// </summary>
        /// <param name="identifier">The identifier of specific window.</param>
        void Remove(Guid identifier);
        /// <summary>
        /// Gets the number of elements contained in the YAMM.PlugIn.IWindowCollection.
        /// </summary>
        /// <value>The number of elements contained in the YAMM.PlugIn.IWindowCollection.</value>
        int Count { get; }

        /// <summary>
        /// Gets the <see cref="YAMM.PlugIn.IWindow"/> with the specified identifier.
        /// </summary>
        /// <value>The window with the specified identifier.</value>
        IWindow this[Guid identifier] { get; }
    }
}
